package com.zelix;

import java.util.StringTokenizer;
import java.util.Vector;

class f0
        implements i0, k0 {

    private j0 a;
    private String b;
    private Vector c;
    private Vector d;
    private boolean e;
    private int f;
    private boolean g;
    private static String z[];

    f0(j0 j0_1, String s) {
        c = new Vector();
        d = new Vector();
        a = j0_1;
        b = s;
    }

    int g() {
        int i1;
        int j1;
        i1 = 0;
        for (j1 = 1; j1 < c.size(); j1++) {
            i0 i0_1 = (i0) c.elementAt(j1);
            if (i0_1.a(false)) {
                int k1 = i0_1.a();
                String s = (String) d.elementAt(j1 - 1);
                i1 = a(i1, k1, s);
            }
        }
        return i1 * -1;
    }

    int h() {
        i0 i0_1 = (i0) c.elementAt(0);
        if (i0_1 instanceof g0) {
            g0 g0_1 = (g0) i0_1;
            return g0_1.g();
        } else {
            return 0;
        }
    }

    public int a() {
        return f;
    }

    public String i() {
        b();
        if (!e)
            return k();
        else
            return null;
    }

    public void b() {
        int i1;
        for (i1 = 0; i1 < c.size(); i1++) {
            i0 i0_1 = (i0) c.elementAt(i1);
            i0_1.b();
        }
        g = false;
        f = 0x80000000;
    }

    public boolean c() {
        i0 i0_1 = (i0) c.elementAt(0);
        return i0_1.c();
    }

    private boolean a(String s) {
        return s.equals("+") || s.equals("-") || s.equals("*") || s.equals("/");
    }

    public boolean d() {
        i0 i0_1 = (i0) c.elementAt(0);
        return i0_1.d();
    }

    public boolean e() {
        i0 i0_1 = (i0) c.elementAt(0);
        return i0_1.e();
    }

    public boolean f() {
        i0 i0_1 = (i0) c.elementAt(0);
        return i0_1.f();
    }

    public boolean j() {
        return g;
    }

    public boolean a(boolean flag) {
        if (!g) {
            int i1;
            g = true;
            for (i1 = 0; i1 < c.size(); i1++) {
                int j1;
                j1 = 0;
                i0 i0_1 = (i0) c.elementAt(i1);
                if (i0_1.a(flag)) {
                    j1 = i0_1.a();
                } else
                    g = false;
                if (!g)
                    continue;
                if (i1 == 0) {
                    f = j1;
                } else {
                    String s = (String) d.elementAt(i1 - 1);
                    f = a(f, j1, s);
                }
            }
        }
        return g;
    }

    private String k() {
        StringTokenizer stringtokenizer;
        e = true;
        stringtokenizer = new StringTokenizer(b, z[3], true);
        while (stringtokenizer.hasMoreTokens()) {
            String s = stringtokenizer.nextToken().trim();
            if (a(s)) {
                d.addElement(s);
            } else {
                Object obj = null;
                int i1 = s.indexOf(".");
                if (h0.a(s)) {
                    h0 h0_1 = new h0(a, s);
                    String s2 = h0_1.g();
                    if (s2 != null)
                        return s2;
                    obj = h0_1;
                } else if (i1 != -1) {
                    String s1 = s.substring(0, i1).trim();
                    String s3 = s.substring(i1 + 1).trim();
                    int k1 = j0.d(s3);
                    if (s1.equals(z[1])) {
                        obj = new g0(a, k1);
                    } else {
                        d0 d0 = a.c(s1);
                        obj = new e0(d0, k1);
                    }
                } else if (Character.isDigit(s.charAt(0))) {
                    try {
                        int j1 = Integer.parseInt(s);
                        obj = new c0(j1);
                    }
                    catch (NumberFormatException _ex) {
                        return z[0] + b + "'";
                    }
                } else {
                    f0 f0_1 = a.b(s);
                    String s4 = f0_1.i();
                    if (s4 != null)
                        return s4;
                    obj = f0_1;
                }
                c.addElement(obj);
                if (c.size() > 1 && ((i0) (obj)).c())
                    return z[2] + s + z[4] + b + "'";
            }
        }
        return null;
    }

    private int a(int i1, int j1, String s) {
        if (s.equals("+"))
            return i1 += j1;
        if (s.equals("-"))
            return i1 -= j1;
        if (s.equals("*"))
            return i1 *= j1;
        else
            return i1 /= j1;
    }

    public String l() {
        return b;
    }

    private static String z(char[] chs) {
        byte key = 0;
        for (int i = 0; i < chs.length; i++) {
            switch (i % 5) {
                case 0:
                    key = 0x26;
                    break;
                case 1:
                    key = 76;
                    break;
                case 2:
                    key = 38;
                    break;
                case 3:
                    key = 116;
                    break;
                case 4:
                    key = 47;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static {
        String as[];
        as = new String[5];
        as[0] = z("v-T\007J\006)T\006@Tl\001".toCharArray());
        as[1] = z("E#H\000NO\"C\006".toCharArray());
        as[2] = z("v-T\007J\006)T\006@Tb\006;AJ5\006\000GCl@\035]U8\006\033_C>G\032K\006/G\032\017D)\006\027@H8G\035AC>\006\006JJ-R\035YCl\034T\b".toCharArray());
        as[3] = z("\ra\f[".toCharArray());
        as[4] = z("\001lO\032\017\001".toCharArray());
        z = as;

    }
}